package ch.lab24.android.rtm.provider;

import ch.lab24.android.rtm.RememberTheMilk;
import android.net.Uri;
import android.provider.BaseColumns;

public class RTM {
    

    /**
     * The content:// style URL for this provider
     */
    public static final Uri CONTENT_URI =
        Uri.parse("content://" + RememberTheMilk.AUTHORITY);

    /**
     * no public constructor since this is a utility class
     */
    private RTM() {}

    public static final class Tasks implements BaseColumns, TasksColumns {
        /**
         * no public constructor since this is a utility class
         */
        private Tasks() {}

        /**
         * The Directory Twig for this subtable
         */
        public static final String CONTENT_DIRECTORY = "tasks";

        /**
         * The content:// style URL for this table
         */
        public static final Uri CONTENT_URI =
            Uri.parse("content://" + RememberTheMilk.AUTHORITY + "/" + CONTENT_DIRECTORY);

        /**
         * The content:// style URL for filtering people by name. The filter
         * argument should be passed as an additional path segment after this URI.
         */
        public static final Uri CONTENT_FILTER_URI =
            Uri.parse("content://" + RememberTheMilk.AUTHORITY + "/tasks/filter");

        /**
         * The content:// style URL for the table that holds the deleted
         * contacts.
         */
        public static final Uri DELETED_CONTENT_URI =
            Uri.parse("content://" + RememberTheMilk.AUTHORITY + "/deleted_tasks");

        /**
         * The MIME type of {@link #CONTENT_URI} providing a directory of
         * people.
         */
        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.lab24.tasks";

        /**
         * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
         * person.
         */
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.lab24.tasks";

        /**
         * The default sort order for this table
         */
        public static final String DEFAULT_SORT_ORDER = DUE + " ASC";  
        
        
    }
    
    /**
     * This table contains the groups for an account.
     */
    public static final class Notes
            implements BaseColumns, NotesColumns {
        /**
         * no public constructor since this is a utility class
         */
        private Notes() {}

        /**
         * The Directory Twig for this subtable
         */
        public static final String CONTENT_DIRECTORY = "notes";

        /**
         * The content:// style URL for this table
         */
        public static final Uri CONTENT_URI =
            Uri.parse("content://" + RememberTheMilk.AUTHORITY + "/" + CONTENT_DIRECTORY);

        /**
         * The content:// style URL for the table that holds the deleted
         * groups.
         */
        public static final Uri DELETED_CONTENT_URI =
            Uri.parse("content://" + RememberTheMilk.AUTHORITY + "/deleted_notes");

        /**
         * The MIME type of {@link #CONTENT_URI} providing a directory of
         * groups.
         */
        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.lab24.notes";

        /**
         * The MIME type of a {@link #CONTENT_URI} subdirectory of a single
         * group.
         */
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.lab24.notes";

        /**
         * The default sort order for this table
         */
        public static final String DEFAULT_SORT_ORDER = MODIFIED + " DESC";

    }
    
    
    public interface TasksColumns
    {
        // This class cannot be instantiated
	    public static final String TABLE = "tasks";
	    public static final String TASKID = "taskid";
	    public static final String NAME = "name";
	    public static final String DUE = "due";
	    public static final String TAGS = "tags";
	    public static final String HAS_DUE = "hasdue";
	    public static final String ADDED = "added";
	    public static final String COMPLETED = "completed";
	    public static final String DELETED = "deleted";
	    public static final String PRIORITY = "priority";
	    public static final String POSTPONED = "postponed";
	    public static final String ESTIMATE = "estimate";
	    public static final String URL = "url";
	    public static final String HAS_NOTES = "hasnotes";
	    public static final String CREATED = "created";
	    public static final String MODIFIED = "modified";    
    }
    
    public interface NotesColumns
    {
        // This class cannot be instantiated
    	public static final String TABLE = "notes";
    	public static final String NOTESID = "notesid";
    	public static final String TASKID = "taskid";
    	public static final String TITLE = "title";
    	public static final String TEXT = "text";
    	public static final String CREATED = "created";
    	public static final String MODIFIED = "modified";
    }
    
}
